package demo

import (
	"fmt"
)

type DatetimeInterface interface {
	String()
	Layout() string
}

type DateLayout struct {
	DatetimeInterface
}


func (this DateLayout) String() {
	fmt.Println(this.Layout())
}

type Datetime struct {
	DateLayout
}

func (this Datetime) Layout() string {
	return "2006-01-02"
}

type Date DateLayout

func (this Date) Layout() string {
	return "2006-01-02"
}

type Time DateLayout

func (this Time) Layout() string {
	return "15:04:05"
}

type TestDatetime struct {
	Datetime Datetime
	Date     Date
	Time     Time
}

var TestDatetimeData = &TestDatetime{
	Datetime: Datetime{DateLayout{}},
	Date:     Date(DateLayout{}),
	Time:     Time(DateLayout{}),
}
